package com.sixth.core.feign;

import com.sixth.core.entity.*;
import com.sixth.core.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @Author: 闫克起
 * @Description:
 * @Date: Create in 11:27 2024/8/12
 */
@FeignClient(value = "hospital-system")
public interface UserFeign {

    @GetMapping("/system/user/getByName/{name}")
    public R<User> getByName(@PathVariable String name);

    @GetMapping("/system/user/getByName/{phone}")
    public R<User> getByPhone(@PathVariable String phone);

    @GetMapping("/system/dict/data/type/{type}")
    R<List<DictData>> listByType(@PathVariable  String type);


    @PostMapping("/system/operLogInfo/save")
    public R save(@RequestBody OperLog operLog);

    @GetMapping("/system/menu/getByUserId/{userId}")
    public R<List<Menu>> getByUserId(@PathVariable Long userId);

    @PostMapping("/system/loginInfo/save")
    public R save(@RequestBody LoginInfo loginInfo);

    @PostMapping("/system/user/findSchedulingUser")
    public R<List<User>> findSchedulingUser(@RequestBody Map<String,Object> params);
}
